package jam.network.message;

import jam.network.*;

/**
 * Class to create a register action
 */
public class ClientActionRegister extends ClientMessage {

	protected String message;

	/**
	 * Constructor.
	 *
	 * @param email, nickname and password, all taken from gui register screen
	 */
	public ClientActionRegister(String email, String pass) {
		super( NetworkController.getTransID() );
		int transID = NetworkController.getTransID();
		message = ("CA_REGISTER:" + transID + ":" + email + ":" + pass);
		NetworkController.sent.put( transID, message);
		NetworkController.setTransID();
	}

	/**
	 * toString method.
	 *
	 * @returns the message to be sent across the network
	 */
	public String toString() {
		return message;
	}
}